//
//  UILabel+AD.swift
//  ADKit
//
//  Created by Adoma on 2023/12/26.
//

import RxGesture
import RxSwift

extension UILabel {
    
    /// by ADKit
    public convenience init(text: String? = nil, font: UIFont? = nil, color: UIColor? = nil) {
        self.init(frame: .zero)
        self.text = text
        self.font = font
        self.textColor = color
    }

}

extension Reactive where Base: UILabel {

    /// by ADKit
    public var tap: Observable<Void> {
        tapGesture().when(.recognized).map({ _ in Void() })
    }
}
